package com.godfrey.controller;

import com.godfrey.pojo.User;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * description : HelloController
 *
 * @author godfrey
 * @since 2020-06-03
 */
@RestController
public class HelloController {

    @GetMapping("/hello")
    public String hello() {
        return "hello";
    }

    @PostMapping("/getUser")
    public User getUser() {
        return new User();
    }

    @ApiOperation("对弈的接口")
    @PostMapping("/godfrey")
    public String godfrey(@ApiParam("用户名") String username) {
        return username;
    }
}
